home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-13 | 900 b | 48 lines | [TEXT/ttxt] |
- -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
- -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
- --
- deferred class BENCH
- --
- -- Comparison : `add_last' for ARRAY, FIXED_ARRAY, LINK_LIST
- -- and LINK2_LIST.
- --
-
- feature
-
- -- According to the power of your computer, set `tuning'
- -- to a good positive value. Default is for very small
- -- computer :
- tuning: INTEGER is 1; -- 600000;
-
- feature {NONE}
-
- frozen bench(cltn: COLLECTION[INTEGER]) is
- require
- cltn.count = 0
- local
- i: INTEGER;
- do
- from
- i := tuning + 1;
- until
- i = 0
- loop
- cltn.add_last(i);
- i := i - 1;
- end;
- debug
- from
- i := cltn.upper - 1;
- until
- i < cltn.lower
- loop
- check
- cltn.item(i) = cltn.item(i + 1) + 1
- end;
- i := i - 1;
- end;
- end;
- end;
-
- end
-